{% extends "admin/layout.html" %}

{% block admin_content %}
<div class="dashboard-content">
    <div class="section-header">
        <h1>Dashboard</h1>
    </div>

    <div class="stats-grid">
        <div class="stat-card">
            <h3>Volunteers</h3>
            <p class="stat-number">{{ stats.volunteer_count }}</p>
            <p class="stat-label">Registered</p>
        </div>
        <div class="stat-card">
            <h3>Organizations</h3>
            <p class="stat-number">{{ stats.charity_count }}</p>
            <p class="stat-label">Active</p>
        </div>
        <div class="stat-card">
            <h3>Activities</h3>
            <p class="stat-number">{{ stats.activity_count }}</p>
            <p class="stat-label">Total</p>
        </div>
        <div class="stat-card">
            <h3>Pending Review</h3>
            <p class="stat-number">{{ stats.pending_activities }}</p>
            <p class="stat-label">Activities</p>
        </div>
    </div>

    <div class="section">
        <div class="section-header">
            <h2>Recent Activities</h2>
            <a href="{{ url_for('admin_activities') }}" class="btn btn-primary">View All</a>
        </div>
        <!-- Add recent activities list here -->
    </div>

    <div class="section">
        <div class="section-header">
            <h2>System Status</h2>
        </div>
        <div class="system-status">
            <div class="status-item">
                <i class="fas fa-server"></i>
                <span class="status-label">Server Status:</span>
                <span class="status-value success">Running</span>
            </div>
            <div class="status-item">
                <i class="fas fa-database"></i>
                <span class="status-label">Database Status:</span>
                <span class="status-value success">Connected</span>
            </div>
        </div>
    </div>
</div>

<style>
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin: 0.5rem 0;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.system-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.status-item i {
    font-size: 1.25rem;
    color: #3498db;
}

.status-label {
    color: #2c3e50;
    font-weight: 500;
}

.status-value {
    margin-left: auto;
    font-weight: 500;
}

.status-value.success {
    color: #28a745;
}

.status-value.warning {
    color: #ffc107;
}

.status-value.error {
    color: #dc3545;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .system-status {
        grid-template-columns: 1fr;
    }
}
</style>
{% endblock %} 